/**
 * 14/02/2014
 * 
 * StockBO
 */
package org.cuatrovientos.erp.business;

import java.util.List;

import org.cuatrovientos.erp.dao.StockDAOInterface;
import org.cuatrovientos.erp.model.Stock;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Holds all the business logic for Stock related management
 * @author Inaki Torres
 */
public class StockBO implements StockBOInterface {

	@Autowired
	private StockDAOInterface stockDAO;

	@Override
	public Stock selectById(int id) {
		return stockDAO.selectById(id);
	}

	@Override
	public List<Stock> selectAll() {
		return stockDAO.selectAll();
	}

	@Override
	public List<Stock> search(String description) {
		return stockDAO.search(description);
	}

	@Override
	public void deleteById(int id) {
		stockDAO.deleteById(id);
	}

	@Override
	public void insert(Stock stock) {
		stockDAO.insert(stock);
	}

	@Override
	public void update(Stock stock) {
		stockDAO.update(stock);
	}
	
}
